//
//  MineCollectExhibitCollectionCell.m
//  ArtDog
//
//  Created by dllo on 16/9/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MineCollectExhibitCollectionCell.h"
#import "UIImageView+WebCache.h"
#import "MineCollectExhibitList.h"

@interface MineCollectExhibitCollectionCell ()

@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@property (weak, nonatomic) IBOutlet UILabel *galleryLabel;

@property (weak, nonatomic) IBOutlet UILabel *cityLabel;

@property (weak, nonatomic) IBOutlet UILabel *countLabel;

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@end

@implementation MineCollectExhibitCollectionCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setExhibitModel:(MineCollectExhibitList *)exhibitModel
{
    _exhibitModel = exhibitModel;
    [_imageView sd_setImageWithURL:[NSURL URLWithString:exhibitModel.exhibitPic] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    _nameLabel.text = exhibitModel.name;
    _galleryLabel.text = exhibitModel.galleryName;
    _cityLabel.text = exhibitModel.exhibitCity;
    _timeLabel.text = [[[exhibitModel.exhibitStartDate substringToIndex:10]stringByAppendingString:@" - "]stringByAppendingString:[[exhibitModel.exhibitEndDate substringToIndex:10] substringFromIndex:5]];

    _countLabel.text = [NSString stringWithFormat:@"%@", exhibitModel.exhibitNum];
}

@end
